package cn.wsalix.msg.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import cn.anlaser.entity.SimpleEntity;
import cn.wsalix.type.PushTypeEnum;

@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "MESS_DETAILS")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@EntityListeners({ AuditingEntityListener.class })
@Data
@EqualsAndHashCode(exclude={},callSuper = false)
@ToString(exclude = { })
public class MessDetails extends SimpleEntity {
	/**
		 * 
		 */
	private static final long serialVersionUID = 8500867520550921062L;
	private String title;
	private String tag;
	private String content;// 产品详情
	private PushTypeEnum pushType;
	@ManyToOne(cascade = CascadeType.MERGE, optional = true, fetch = FetchType.LAZY)
	@JoinColumn(name = "MESSAGE_ID")
	private Message message;// 店铺
	
}